# stbiconv Makefile
STB_DIR = ../../lib/stb/stb
INCLUDES = -I$(STB_DIR)
DEFINES =
CC ?= gcc
CFLAGS = -O3 $(INCLUDES) $(DEFINES)
LD = $(CC)
LDFLAGS =
LIBS = -lm

TARGETS = stbi_bmp2jpg stbi_jpg2bmp

.c.o:
	$(CC) $(CFLAGS) -c -o $@ $<

all: $(TARGETS)

bench: $(TARGET_BENCH)

stbi_bmp2jpg: stbi_bmp2jpg.o
	$(LD) $(LDFLAGS) -o $@ $+ $(LIBS)

stbi_jpg2bmp: stbi_jpg2bmp.o
	$(LD) $(LDFLAGS) -o $@ $+ $(LIBS)

.PHONY: clean

clean:
	$(RM) $(TARGETS) *.o

